FROM node:10.24.0-buster-slim AS build

RUN npm config set registry https://registry.npm.taobao.org

RUN npm install -g @vue/cli

WORKDIR /app

COPY package.json .
COPY package-lock.json .

RUN npm install

COPY . .

RUN npm run build

##############################

FROM nginx:alpine

COPY --from=build /app/dist /usr/share/nginx/html
